package com.xinxing.city.recoverycheck;

import com.google.inject.Injector;
import com.google.inject.Key;

/**
 * Created by icyhy on 2016/3/1 0001.
 */
public class DI {
    private static Injector injector;

    public static Injector getInjector() {
        return injector;
    }

    public static void setInjector(Injector injector) {
        DI.injector = injector;
    }

    public static <T> T getInstance(Key<T> key) {
        return injector.getInstance(key);
    }

    public static <T> T getInstance(Class<T> key) {
        return injector.getInstance(key);
    }


}
